<nz-layout style="height:100%;min-width: 800px;" id="main">
  <nz-header>
    <div class="header">
      <div class="logo" routerLink="/main/index">
        <div class="logo-img">
          <img src="assets/images/logo.png" alt="Cinderella">
        </div>

        <div class="logo-name">
          <span>ZHI&nbsp;GUAN&nbsp;YIN</span>
          <P>智管印</P>
        </div>
      </div>
      <div class="hd-menu">
        <nz-dropdown>
          <a nz-dropdown>
            <div class="home_head">
              <img src="{{logo}}" alt="photo">
              <span class="myname">{{name}}</span>
            </div>
          </a>
          <ul nz-menu nzSelectable class="hd-drop">
            <li nz-menu-item>
              <a alt="修改信息" title="修改信息" routerLink="/main/infosetting/1/editpersoninfo"><i nz-icon type="form" theme="outline"></i>修改信息</a>
            </li>
            <li nz-menu-item>
              <a alt="修改密码" title="修改密码" routerLink="/main/infosetting/2/editpassword"><i nz-icon type="lock" theme="outline"></i>修改密码</a>
            </li>
            <li nz-menu-item>
              <a alt="我要反馈" title="我要反馈" routerLink="/main/infosetting/3/feedback"><i nz-icon type="notification" theme="outline"></i>我要反馈</a>
            </li>
            <li nz-menu-divider></li>
            <li nz-menu-item>
              <button class="loginout" (click)="loginOut()"><i nz-icon type="export" theme="outline"></i>退出登录</button>
            </li>
          </ul>
        </nz-dropdown>
      </div>
    </div>
  </nz-header>
  <nz-layout>
    <nz-sider [nzWidth]="200">
      <ul nz-menu [nzMode]="'inline'" style="height:100%;overflow-x: hidden;overflow-y: auto;">
        <div class="home_div">
          <nz-input-group [nzSuffix]="suffixIconSearch" style="width:160px;height: 27px;">
            <input type="text" readonly id="menuInput" (keyup.enter)="searchMenu()" (focus)="onFocus()" nz-input [(ngModel)]="menuSearch"
              autocomplete="off" style="height: 27px" placeholder="菜单搜索">
          </nz-input-group>
          <ng-template #suffixIconSearch>
            <i (click)="searchMenu()" style="padding-right:0;cursor: pointer;" nz-icon type="search"></i>
          </ng-template>
        </div>

        <nz-tree #treeCom [nzData]="nodes" nzShowIcon="true" (nzClick)="nzEvent($event)"></nz-tree>

        <!-- <li nz-menu-item  routerLink="/main/index"><span><i nz-icon type="link"></i>首页</span></li>
        <li nz-submenu  [(nzOpen)]="openMap.sub1"  (nzOpenChange)="openHandler('sub1')">
          <span title><i nz-icon type="cluster"></i>管理员及权限</span>
          <ul>
            <li nz-menu-item routerLink="/main/roles">角色管理</li>
            <li nz-menu-item routerLink="/main/acount">账号管理</li>
          </ul>
        </li>
        <li nz-submenu  [(nzOpen)]="openMap.sub2"  (nzOpenChange)="openHandler('sub2')">
          <span title><i nz-icon type="printer"></i>设备相关管理</span>
          <ul>
            <li nz-menu-item routerLink="/main/printer">设备管理</li>
            <li nz-menu-item routerLink="/main/meterlist">抄表记录</li>
          </ul>
        </li>
        <li nz-menu-item  routerLink="/main/maintlist"><span><i nz-icon type="dashboard"></i>维修员管理</span></li>
        <li nz-menu-item  routerLink="/main/tenantlist"><span><i nz-icon type="team"></i>租户管理</span></li>
        <li nz-submenu  [(nzOpen)]="openMap.sub3"  (nzOpenChange)="openHandler('sub3')">
          <span title><i nz-icon type="solution"></i>工单相关管理</span>
          <ul>
            <li nz-menu-item routerLink="/main/tasklist">工单管理</li>
            <li nz-menu-item routerLink="/main/notdealfault">不指派任务</li>
            <li nz-menu-item routerLink="/main/printertask">任务管理</li>
          </ul>
        </li>
        <li nz-submenu  [(nzOpen)]="openMap.sub4"  (nzOpenChange)="openHandler('sub4')">
          <span title><i nz-icon type="audit"></i>合同管理</span>
          <ul>
            <li nz-menu-item routerLink="/main/signlist">设备合同</li>
            <li nz-menu-item routerLink="/main/userbill">租户账单</li>
            <li nz-menu-item routerLink="/main/printerbill">抄表账单</li>
          </ul>
        </li>
        <li nz-submenu  [(nzOpen)]="openMap.sub5"  (nzOpenChange)="openHandler('sub5')">
          <span title><i nz-icon type="insurance"></i>财务管理</span>
          <ul>
            <li nz-menu-item routerLink="/main/wxpay">微信收款码</li>
            <li nz-menu-item routerLink="/main/zfbpay">支付宝收款码</li>
          </ul>
        </li>
        <li nz-submenu  [(nzOpen)]="openMap.sub6"  (nzOpenChange)="openHandler('sub6')">
          <span title><i nz-icon type="file-search"></i>日志管理</span>
          <ul>
            <li nz-menu-item routerLink="/main/managerlog">管理员日志</li>
            <li nz-menu-item routerLink="/main/maintlog">维修员日志</li>
            <li nz-menu-item routerLink="/main/tenantlog">租户日志</li>
          </ul>
        </li> -->
        
      </ul>
    </nz-sider>
    <nz-layout style="padding:0 24px 24px;position: relative;">
      <nz-content style="background:#fff;padding: 80px 24px 24px;min-height:280px;height:100%;overflow:auto;">
        <router-outlet></router-outlet>
      </nz-content>
    </nz-layout>
  </nz-layout>
</nz-layout>
